<%--
  Created by IntelliJ IDEA.
  User: Sarah
  Date: 2023/3/22
  Time: 20:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <base href="<%= basePath %>"/>
    <title>测试SpringMVC获取前端数据</title>
</head>

<body>
    <a href="getUserId">提交UserID属性值</a><br/>
    <h3>使用form表单提交用户信息</h3>
    <form action="getUser">
       用户Id: <input type="text" name="id" /><br/>
        用户名：<input type="text" name="username" /><br/>
        用户地址：<input type="text" name="address" /><br/>
        <input type="submit" value="提交">
    </form>
    <h3>测试参数绑定</h3>
    <a href="getParams?id=100&name=goktech">测试参数绑定</a>
    <h3>测试参数不一致绑定</h3>
    <a href="getParams2?ids=100&names=goktech">测试参数绑定</a>
</body>
</html>